package com.lzx.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author lzx
 * @since 2022-12-28
 */
@Getter
@Setter
@ApiModel(value = "Inform对象", description = "")
public class Inform {
    @ApiModelProperty("编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("接收通知的用户")
    private Integer userId;

    @ApiModelProperty("发通知的用户")
    private Integer sender;

    @ApiModelProperty("昵称")
    private String nickname;

    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("通知类型(1:评论(问题),2:新增粉丝,3:赞(评论),4:收藏,5:好友申请,6:赞(评论),7:赞(文章),8:评论(文章))")//使用枚举
    private int type;

    @ApiModelProperty("消息")
    private String message;

    @ApiModelProperty("是否已读(0未读,1已读)")
    private int isRead;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
}
